package com.jprocms.module.cms.controller.directive;

import com.jprocms.module.cms.config.JproProperties;
import com.jprocms.module.cms.service.channel.ChannelService;
import com.jprocms.module.cms.service.content.ContentService;
import freemarker.core.Environment;
import freemarker.template.TemplateDirectiveBody;
import freemarker.template.TemplateException;
import freemarker.template.TemplateModel;

import java.io.IOException;
import java.util.Map;

/**
 * 内容分页 自定义标签
 *
 * @author jprocms
 */
public class ContentPageDirective extends ContentListDirective {
    @SuppressWarnings("unchecked")
    @Override
    public void execute(Environment env, Map params, TemplateModel[] loopVars, TemplateDirectiveBody body)
            throws TemplateException, IOException {
        doExecute(env, params, loopVars, body, true);
    }

    public ContentPageDirective(ContentService contentService, ChannelService channelService, JproProperties jproProperties) {
        super(contentService, channelService, jproProperties);
    }
}
